home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Games Galore!
/
Shareware Games Galore!.iso
/
arcade
/
corewars
/
snare3.rdc
< prev
next >
Wrap
Text File
|
1988-07-22
|
989b
|
36 lines
; SNARE3 replication task: Copies trap module and splits to it
;
Length EQU Sign-Source
Distanc EQU 500 ; how far away the next copy is MOVed
Copies EQU 8000/Distanc-1 ; How many copies to do
Recognz EQU 42*42 ; Private signature
Freq EQU Distanc/50
;
Start MOV #Copies, Counter
Spread MOV #Length, Source ; initialise pointers
ADD #Distanc, Dest
Copy MOV @Source, <Dest ; copy whole program
DJN Copy, Source
ADD #1, Dest
SPL @Dest ; SPLit to new task
DJN Spread, Counter
Counter JMP Restart
; SNARE3 child killer task: traps enemies with SPL 0 instructions and
; subsequently kills them with DAT statements!
;
Dest DAT -1 ; killer location
Source DAT 0
Bomb SPL Bomb ; killer value A
;
Restart MOV #-1, Dest ; start from dest-1
;
Loop MOV Bomb, @Dest ; kill
SUB #Freq, Dest
CMP #Recognz, @Dest ; last?
JMP Loop ; no - go again
MOV Dest, Bomb
JMP Restart ; yes - kill again?
;
Sign DAT Recognz ; "SNARE3" signature